import { ConfigProvider } from 'antd-mobile'
import { Fragment } from 'react'
import { RouterProvider } from 'react-router-dom'

import { useAntConfig, useUpdate } from './hooks'
import router from './router'

function App() {
  const antConfig = useAntConfig()

  useUpdate()

  return (
    <Fragment>
      <ConfigProvider {...antConfig}>
        <RouterProvider router={router} />
      </ConfigProvider>
    </Fragment>
  )
}

export default App
